<include file="Public:pagerForm"/>
<div class="pageHeader">
    <neq name='sign' value=''>
        <form rel="pagerForm" onsubmit="return navTabSearch(this);" action="__CONTROLLER__/endIndex" method="post">
    <else/>
        <form rel="pagerForm" onsubmit="return navTabSearch(this);" action="__CONTROLLER__/index" method="post">
    </neq>
    
	<div class="searchBar">		
            <table class="searchContent">
                <tr>
                    <td>
                        被考核人：<input type="text" name="accept_user" value="<{$Think.post.accept_user}>"/>
                    </td>
                    <td>
                        审核人：<input type="text" name="assign_user" value="<{$Think.post.assign_user}>"/>
                    </td>
                    <td>
                        添加年份：<input type="text" name="year"  value="<{$Think.post.year}>"/>
                    </td>                    
                    <td>
                        季度:<select name="quarter" style="width:70px">
                            <option value="">请选择</option>
                            <option value="Q1" <if condition="$Think.post.quarter eq Q1">selected</if>>Q1</option>
                            <option value="Q2" <if condition="$Think.post.quarter eq Q2">selected</if>>Q2</option>
                            <option value="Q3" <if condition="$Think.post.quarter eq Q3">selected</if>>Q3</option>
                            <option value="Q4" <if condition="$Think.post.quarter eq Q4">selected</if>>Q4</option>                            
                        </select>
                    </td>
                    <neq name='sign' value=''>
                        <td>
                            审核时间：<input type="text" name="end_time" class='date' readonly="true" value="<{$Think.post.end_time}>"/>
                        </td>
                    </neq>
                </tr>
            </table>
            <div class="subBar">
                <ul>
                    <li><div class="buttonActive"><div class="buttonContent"><button type="submit">检索</button></div></div></li>
                </ul>
            </div>
	</div>
    </form>
</div>
<div class="pageContent">
    <div class="panelBar">
        <ul class="toolBar">            
            <eq name="sign" value="">
                <li><a class="add" href="<{:U('Kpi/show',array('sign'=>code('1',1)))}>" target="dialog" mask="true" width='650' height='550'><span>新增考核</span></a></li>
            </eq>
            <eq name="Think.session.role_id" value="67">
                <eq name="sign" value="">
                    <li><a class="add" href="<{:U('Kpi/show_e')}>" target="dialog" mask="true" width='400' height='250'><span>新增全员考核</span></a></li>
                </eq>
                <li><a title="确实要删除这些记录吗?" target="selectedTodo" rel="id[]" href="__CONTROLLER__/del" class="delete"><span>批量删除</span></a></li>             
                <eq name="sign" value="1">
                    <li><a title="确实要公布这些考核吗?" target="selectedTodo" rel="id[]" href="__CONTROLLER__/gongbu" class="delete"><span>公布考核</span></a></li>
                </eq>
            </eq>
            <!--<li><a class="edit" href="__CONTROLLER__/show/id/{l_id}" target="dialog" mask="true" warn="请选择一条信息" width='600' height='400'><span>修改考核</span></a></li>-->
            <li class="line">line</li>
        </ul>
    </div>
    <table class="table" width="100%" layoutH="138">
        <thead>
            <tr>
                <eq name="Think.session.role_id" value="67">
                    <th width="22"><input type="checkbox" group="id[]" class="checkboxCtrl"></th>
                </eq>
                <th width="40"  align="center">序号</th>
                <th width="100" align="center">被考核人</th>
                <th width="100" align="center">被考核人英文名</th>
                <th width="70" align="center">部门</th>
                <th width="100" align="center" orderField="quarter" align="center" <if condition="$_REQUEST['_order'] eq 'quarter'">class="<{$_REQUEST._sort}>"</if>>考核季度</th>
                <th width="40" align="center">奖励</th>
                <th width="40" align="center" >惩罚</th>
                <th width="40" align="center" align="center" orderField="total_score" align="center" <if condition="$_REQUEST['_order'] eq 'total_score'">class="<{$_REQUEST._sort}>"</if>>总分</th>
                <th width="40" align="center" >等级</th>
                <th width="55" align="center" >是否自评</th>
                <th width="75" align="center" >是否已分配任务</th>
                <th width="50" align="center" >审核人</th>
                <th width="140" align="center" orderField="end_time" align="center" <if condition="$_REQUEST['_order'] eq 'end_time'">class="<{$_REQUEST._sort}>"</if>>审核时间</th>
                <eq name="sign" value="1">
                    <th width="60" align="center">是否已公布</th>
                </eq>                
                <th width="150" align="center">操作</th>
            </tr>
        </thead>
        <tbody>
            <foreach name='list' item="list">
                <tr target="l_id" rel="<{$list.id}>">
                    <eq name="Think.session.role_id" value="67">
                        <td><input name="id[]" value="<{$list.id}>" type="checkbox"></td>
                    </eq>
                    <td><{$key+1}></td>
                    <td><{$list.accept_id|getUsername}></td>
                    <td><{$list.accept_id|getUsername=1}></td>
                    <td><{$list.section_id|getSection}></td>
                    <td><{$list.quarter}></td>
                    <td>
                        <if condition="($list['is_gongbu'] eq 0) and ($list['accept_id'] eq $_SESSION['authId'])">
                            待公布
                        <else/>
                            <{$list.rewards}>
                        </if>
                    </td>
                    <td>
                        <if condition="($list['is_gongbu'] eq 0) and ($list['accept_id'] eq $_SESSION['authId'])">
                            待公布
                        <else/>
                            <{$list.punishment}>
                        </if>
                    </td>
                    <td>
                        <if condition="($list['is_gongbu'] eq 0) and ($list['accept_id'] eq $_SESSION['authId'])">
                            待公布
                        <else/>
                            <{$list.total_score}>
                        </if>
                    </td>
                    <td>
                         <if condition="($list['is_gongbu'] eq 0) and ($list['accept_id'] eq $_SESSION['authId'])">
                            待公布
                        <else/>
                            <{$list.final_score_level}>
                        </if>
                    </td>
                    <td>
                        <neq name="list['is_self']" value='0'>
                            <div style="color:green">是</div><else/><div style="color:red">否</div>
                        </neq>
                    </td>
                    <td>
                        <neq name="list['is_tasks']" value='0'>
                            <div style="color:green">是</div><else/><div style="color:red">否</div>
                        </neq>
                    </td>
                    <td><{$list.assign_id|getUsername}></td>
                    <td>
                        <neq name="list['is_examine']" value='0'>
                            <{$list.end_time|substr=0,10}>
                        <else/>
                            <div style="color:red">未审核</div>
                        </neq>
                    </td>
                    
                    <eq name="sign" value="1">
                        <td>
                            <neq name="list['is_gongbu']" value="1">
                                <div style="color:red">未公布</div>
                            <else/>
                                <div style="color:green">是</div>
                            </neq>
                        </td>
                    </eq>
                        
                    
                    <td>
                        <a href="<{:U('Kpi/show_',array('id'=>code($list['id'],1)))}>" target="navTab" >
                            <span>
                                <eq name="list['end_time']" value=''>
                                    审核
                                <else/>
                                    重新审核
                                </eq>
                            </span>
                        </a> |  
                        <a href="<{:U('Kpi/takList',array('kpi_id'=>code($list['id'],1)))}>" target="navTab" ><span>项目列表</span></a>
                        <eq name="Think.session.role_id" value="67"> |  
                            <a title="确定删除该考核" target="ajaxTodo" href="<{:U('Kpi/del',array('id'=>code($list['id'],1)))}>" >删除</a>                       
                        </eq>
                    </td>
                </tr>
            </foreach>
        </tbody>        
    </table>
    <div class="panelBar">
        <div class="pages">
            <span>显示</span>
            <select class="combox" name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value})">
                <option value="20">20</option>
                <option value="50">50</option>
                <option value="100">100</option>
                <option value="200">200</option>
            </select>
            <span>条，共<{$totalCount}>条</span>          
        </div>
        <div class="pagination" targetType="navTab" totalCount="<{$totalCount}>" numPerPage="<{$numPerPage}>" pageNumShown="6"  currentPage="<{$currentPage}>"></div>
    </div>
</div><style type="text/css" media="screen">
    .imgs div{height:100px!important;}
</style>
